<!--
 订单结算页
 Created by xunyin
 CopyRight 讯音云商（厦门）科技有限公司  www.tonetn.com
-->
<template>
	<view class="closeAccount">
		<view class="payTime">
			<view class="payText">
				剩余支付时间
			</view>
			<view class="timeBox">
				<view class="time one">
					{{minutes}}
				</view>
				:
				<view class="time two">
					{{seconds}}
				</view>
			</view>
		</view>
		<view class="headerBox">
			<view class="roomBox">
				<!-- <image src="../../../static/logo.png" mode=""></image> -->
				<image :src="image" mode=""></image>
				<view class="nameBox">
					<view class="name">
						{{storeName}}
					</view>
					<view class="roomName">
						{{storeRoomName}}
					</view>
					<view class="money" v-if="userGradeDiscount == 10">
						￥{{ moneyFilter(orderMoney) }}<text>元</text>
					</view>
					<view class="money" v-if="userGradeDiscount != 10">
						￥{{ moneyFilter(orderMoney) }}<text>元</text>
						<text class="moneyBoxLine">￥{{ moneyFilter(orderMoneyOrg)}} </text>
					</view>
					<view class="money" v-if="userGradeDiscount != 10">
						{{userGradeName}} 享受 {{userGradeDiscount}} 支付折扣
					</view>
				</view>
			</view>
			<view class="roomMsgBox">
				<view class="timeBox" v-show="orderType==2">
					<text>消费时间</text>
					<!-- <text class="time">{{orderDetail.startTime}}至{{orderDetail.endTime}}</text> -->
					<text class="time">{{selectTimeText}}</text>

				</view>
				<view class="moneyBox">
					<text>单价</text>
					<!-- <text class="time">续订{{repeatPrice}}元/小时</text> -->
					<text class="timeText">{{price}}元/小时</text>
				</view>
			</view>
		</view>

		<view class="ticketBox" @click="ticketShow = true">
			<text class="title">卡券</text>
			<text
				class="content">{{selectTicket.length == 0 ? ticketList[0].length+'张可用>' : selectTicket[0].startText+'>' }}</text>
		</view>

		<view class="ticketBox" @click="couponShow = true">
			<text class="title">优惠券</text>
			<text
				class="content">{{selectConpon.length == 0 ? couponList[0].length+'张可用>' : selectConpon[0].startText+'>' }}</text>
		</view>

		<view class="paymentFun">
			<view class="title">
				支付方式
			</view>
			<u-radio-group v-model="value">
				<view class="funBox" @click="radioChange('code')">
					<view class="left">
						<image src="../../../static/images/yue.png" mode=""></image>
						通用储值卡 <text>(余额{{generalMoney}})</text>
					</view>
					<u-radio name="code" :disabled="false" @change="radioChange('code')">
					</u-radio>
				</view>
				<view class="funBox" @click="radioChange('shop')">
					<view class="left">
						<image src="../../../static/images/yue.png" mode=""></image>
						门店储值卡 <text>(余额{{shopMoney}})</text>
					</view>
					<u-radio name="shop" :disabled="false" @change="radioChange('shop')">
					</u-radio>
				</view>

				<view class="funBox" @click="radioChange('weix')" > <!-- style="display:none" -->
					<view class="left">
						<image src="../../../static/images/weixin.png" mode=""></image>
						微信支付
					</view>
					<u-radio name="weix" :disabled="false" @change="radioChange('weix')" >
					</u-radio>
				</view>

			</u-radio-group>
		</view>

		<view class="bottomBox">
			<view class="moneyBox">
				<text>实付</text>
 				<text>￥{{ moneyFilter(realMoney)}}元</text>
				<text>应付￥{{ moneyFilter(orderMoney)}}</text>
<!-- 				<text>￥{{orderDetail.money}}元</text>
				<text>应付￥{{orderDetail.deal}}</text> -->
			</view>
			<view class="buttonBox" v-if="buttonState" @click="submitOrder()">
				确定支付
			</view>
			<view class="buttonBoxTwo" v-else>
				确定支付
			</view>

		</view>

		<u-picker :show="ticketShow" :columns="ticketList" keyName="startText" @confirm="confirm" @cancel="cancel">

		</u-picker>

		<u-picker :show="couponShow" :columns="couponList" keyName="startText" @confirm="confirm1" @cancel="cancel1">

		</u-picker>

	</view>
</template>

<script>
	import {
		OrderDetail,
		TicketList
	} from "../../../utils/request/gather.js"
	import { myCouponList } from "@/api/coupon";
	import { mapGetters } from "vuex";
	import { getUserInfo,getStoreBalanceList,getUserGradeByUserId } from '@/api/user';
	import { orderPay } from '@/api/order';
	import {weappPay } from "@/libs/wechat";

	export default {
		data() {
			return {
				value: '', // 支付方式
				orderDetail: {}, // 订单详情数据
				minutes: 15, // 剩余的分钟
				seconds: 0, // 剩余的秒钟
				endTimeNumBox: null, // 时间戳容器
				ticketList: [
					[]
				], // 卡券列表
				ticketShow: false, // 选择卡券的显示状态
				selectTicket: [], // 当前选择的卡券
				couponList: [
					[]
				], // 优惠券列表
				couponShow: false, // 选择优惠券的显示状态
				selectConpon: [], // 当前选择的优惠券
				info: {}, // 用户信息
				generalMoney: 0, // 通用储值卡余额
				shopMoney: 0, // 门店储值卡余额
				buttonState: true, // 确认支付是否能支付的状态
				teaId: 0,
				teaChildId: 0,
				storeRoomName: "",
				storeName: "",
				image: "",
				orderMoney:0,
				selTimeData:{},
				price:0,
				repeatPrice:0,
				isRepeat:0,
				timeInterval:0,
				selectTimeText:"",
				balanceList: [],
				selConponId:0,
				selConponType:"C",
				selConponBalance:0,
				selConponReachMoney:0,
				selHorNConponId:0,
				selHorNConponType:"H",
				selRemHourCount:0, // 小时卡，剩余小时数
				selRemUseableCount:0, // 次数卡，剩余次数
				selEveryUseableHourCount:0, // 次数卡，每次可使用小时数
				realMoney:0,
				compuRemHourMoney:0,
				payType:0 ,// 默认选择微信支付
				yeardate:"",
				monthDay:"",
				startTime:"",
				endTime:"",
				endDate:"",
				parentOrderId:0,
				timeOutCount:0,
				userGradeName:"",
				userGradeDiscount:10,
				orderMoneyOrg:0,
				orderType:null
			}
		},
		computed: mapGetters(["userInfo"]),
		onLoad(e) {
			this.teaId = e.teaId
			console.log("this.teaId:" + this.teaId);
			this.teaChildId = e.teaChildId
			this.storeRoomName = e.storeRoomName
			this.storeName = e.storeName
			this.image = e.image
			console.log("this.image:" + this.image);
			this.orderMoney = e.orderMoney
			this.realMoney = e.orderMoney
			this.orderMoneyOrg = e.orderMoney
			this.selTimeData = e.selTimeData
			this.price = e.price
			this.timeInterval = e.timeInterval
			this.selectTimeText = e.selectTimeText
			this.orderType=e.orderType
			this.yeardate = e.yeardate;
			this.monthDay = e.monthDay;
			this.startTime = e.startTime;
			this.endTime = e.endTime;
			this.endDate = e.endDate;
			this.parentOrderId = e.parentOrderId;
			this.repeatPrice = e.repeatPrice;
			this.isRepeat = e.isRepeat;
			this.getCodeNum();    // 获取储值卡余额
			this.getTicketList(); // 获取卡券列表
			this.getCouponList(); // 获取优惠券列表
			// 获取用户会员对应的等级折扣
			this.getUserGrade();

/* 			url = url+'?teaId='+this.teaId + '&teaChildId='+this.teaChildId + '&storeRoomName='+this.storeRoomName +
				'&storeName='+this.storeName + '&image=' + this.image + '&orderMoney=' + orderMoney + '&selTimeData=' + this.selTimeData +
				'&price='+this.price */
		},
		created() {
			this.getOrderDetail(); // 获取订单详情数据
			//this.getUserInfo() // 获取用户信息

		},
		beforeDestroy(){
			//退出订单确认页面时，清楚定时器
			clearInterval(this.endTimeNumBox);
		},
		methods: {

			getCodeNum() { // 获取储值卡余额
				console.log("getCodeNum-this.teaId:" + this.teaId);
				let param = {
					storeId:this.teaId
				}
				getStoreBalanceList(param).then(res => {
					this.balanceList = res.data
					this.generalMoney = this.balanceList[0].userBalance // 通用储值卡余额
					if(this.balanceList.length<2){
						this.shopMoney = 0 // 门店储值卡余额
					}else{
						this.shopMoney = this.balanceList[1].userBalance // 门店储值卡余额
					}
					this.radioChange('code');
				})

			},
			getUserGrade(){
				let param = {}
				getUserGradeByUserId(param).then(res => {
					var mtUserGrade = res.data.mtUserGrade;
					if(mtUserGrade!=null){
						// mtUserGrade.name
						this.orderMoney = this.orderMoney*(mtUserGrade.discount*0.1);
						this.realMoney = this.realMoney*(mtUserGrade.discount*0.1);
						this.userGradeName = mtUserGrade.name;
						this.userGradeDiscount = mtUserGrade.discount;
					}
				})
			},

			getUserInfo() { // 获取用户信息
/* 				let data = uni.getStorageSync("userInfo")
				data = JSON.parse(data)
				this.info = data */
			},

			// 确定选择某一个卡券
			confirm(e) {
				console.log("confirm_e:"+JSON.stringify(e));
/* 				selRemHourCount:0, // 小时卡，剩余小时数
				selRemUseableCount:0, // 次数卡，剩余次数
				selEveryUseableHourCount:0, // 次数卡，每次可使用小时数 */
				// 计算实付金额
				if(e.value[0].type==='H'){
					this.selRemHourCount = e.value[0].remHourCount
					if(this.selRemHourCount<=0){
						uni.showToast({
							title: "小时数已使用完",
							icon: "none"
						})
						return false;
					}
					this.compuRealMoney();
					if(this.realMoney<=0){
						uni.showToast({
							title: "实付金额为0，不需要使用小时券",
							icon: "none"
						})
						return false;
					}
					this.compuRemHourMoney = e.value[0].remHourCount*this.price;
					if(this.isRepeat==1){
						this.compuRemHourMoney = e.value[0].remHourCount*this.repeatPrice;
					}
					if(this.compuRemHourMoney>=this.realMoney){
						this.realMoney = 0;
					}else{
						this.realMoney = this.realMoney-this.compuRemHourMoney;
					}

				}else{

					this.selRemUseableCount = e.value[0].remUseableCount
					this.selEveryUseableHourCount = e.value[0].everyUseableHourCount
					if(this.selRemUseableCount<=0){
						uni.showToast({
							title: "次数已使用完",
							icon: "none"
						})
						return false;
					}
					this.compuRealMoney();
					if(this.realMoney<=0){
						uni.showToast({
							title: "实付金额为0，不需要使用次数券",
							icon: "none"
						})
						return false;
					}
					this.compuRemHourMoney = e.value[0].everyUseableHourCount*this.price;
					if(this.isRepeat==1){
						this.compuRemHourMoney = e.value[0].remHourCount*this.repeatPrice;
					}
					if(this.compuRemHourMoney>=this.realMoney){
						this.realMoney = 0;
					}else{
						this.realMoney = this.realMoney-this.compuRemHourMoney;
					}
				}

				this.selectTicket = e.value
				this.selHorNConponId = this.selectTicket[0].id
				this.selHorNConponType = this.selectTicket[0].type
				this.cancel()

			},

			// 确定选择某一个优惠券
			confirm1(e) {

				console.log("confirm1_e:"+JSON.stringify(e));

				if(this.realMoney <= 0){
					uni.showToast({
						title: "实付金额为0，不需要使用优惠券",
						icon: "none"
					})
					return false;
				}

				// 计算实付金额
				if(e.value[0].reachMoney > this.orderMoney){

					uni.showToast({
						title: "该优惠券满"+e.value[0].reachMoney+"金额使用",
						icon: "none"
					})
					return false;

				}

				this.compuRealMoney1();

				// 先把上一次选择的优惠券扣减金额加回来

				console.log("this.selConponBalance:"+this.selConponBalance);
				console.log("this.selConponBalance:"+e.value[0].balance);

				this.realMoney = this.realMoney + this.selConponBalance;

				if(e.value[0].balance >= this.realMoney){

					this.realMoney = 0;

				}else{

					this.realMoney = this.realMoney - e.value[0].balance;

				}

				this.selectConpon = e.value
				this.selConponId = e.value[0].id
				this.selConponBalance = e.value[0].balance
				this.selConponReachMoney = e.value[0].reachMoney

				this.cancel1()
			},

			// 重新选择卡券，重新计算实付金额
			compuRealMoney(){

				if(this.selConponBalance >= this.orderMoney){
					this.realMoney = 0;
				}else{
					this.realMoney = this.orderMoney-this.selConponBalance;
				}

				this.selectTicket = []
				this.selHorNConponId = 0
				this.selHorNConponType = 'H'
				this.compuRemHourMoney = 0
			},

			// 重新选择优惠券，重新计算实付金额
			compuRealMoney1(){

				// 表示有选择了卡券
				if(this.selHorNConponId>0){

					if(this.compuRemHourMoney >= this.orderMoney){

						this.realMoney = 0;

					}else{

						this.realMoney = this.orderMoney-this.compuRemHourMoney;

					}
/* 					if(this.selHorNConponType==='H'){

					}else{

					}	 */

/* 					if(this.selConponBalance >= this.orderMoney){
						this.realMoney = 0;
					}else{
						this.realMoney = this.orderMoney-this.selConponBalance;
					} */
				}

/* 				this.selectConpon = []
				this.selConponId = 0
				this.selConponBalance = 0
				this.selConponReachMoney = 0 */

			},
			cancel() { // 取消选择框的显示
				this.ticketShow = false
			},
			cancel1() { // 取消选择框的显示
				this.couponShow = false
			},
			// 获取卡券列表
			getTicketList() {
				let that = this
/* 				TicketList().then(res => {
					that.ticketList = [res.data.data]
				}) */
				let status='A'
				let param = {
					status:status,
					userId:this.userInfo.uid,
					queryTypeScope:1,
					storeId:this.teaId
				}
				myCouponList(param).then(res => {
					that.ticketList = [res.data.myCouponList.content]
					//that.couponList = res.data.myCouponList.content

				})
			},

			// 获取优惠券列表
			getCouponList() {
				let that = this
				let status='A'
				let param = {
					status:status,
					userId:this.userInfo.uid,
					queryTypeScope:2,
					storeId:this.teaId
				}
				myCouponList(param).then(res => {
					that.couponList = [res.data.myCouponList.content]
				})
			},
			radioChange(e) { // 切换支付方式
				this.value = e
				let that = this
				switch (e) {
					case 'code':
						if (that.generalMoney < that.realMoney) { // 通用储值卡余额不足
							uni.showToast({
								title: "通用储值卡余额不足",
								icon: "none"
							})
							that.buttonState = false
						} else {
							this.payType = 0; // 通用储值卡支付
							that.buttonState = true
						}
						break;
					case 'shop':

						if (that.shopMoney < that.realMoney) { // 门店储值卡余额不足
							uni.showToast({
								title: "门店储值卡余额不足",
								icon: "none"
							})
							that.buttonState = false
						} else {
							this.payType = 1;	// 门店储值卡支付
							that.buttonState = true
						}
						break;
					default:
						this.payType = 2;
						that.buttonState = true;
						break;
				}
			},
			// 提交订单
			submitOrder(){
				console.log("submitOrder_payType:"+this.payType);
/* 				this.yeardate = e.yeardate;
				this.monthDay = e.monthDay;
				this.startTime = e.startTime;
				this.endTime = e.endTime; */

				let param = {
					teaId:this.teaId,
					teaChildId:this.teaChildId,
					userId:this.userInfo.uid,
					useCouponId:this.selConponId,
					useHourCouponId:this.selHorNConponId,
					payType:this.payType,
					// teaSubscribeTimes:JSON.stringify(teaSubscribeTimes),
					// serverTime:teaServerTime,
					// teaServerStartTime:teaServerStartTime,
					// teaServerEndTime:teaServerEndTime,
					timeInterval:this.timeInterval,
					parentOrderId:this.parentOrderId,
					isRepeat:this.isRepeat,
					orderType:this.orderType
				}
				if(this.orderType==2){
					var year = this.yeardate.substring(0,5);
					var teaSubscribeTimes = {date:this.monthDay,selectBeginTime:this.startTime,endDate:this.endDate,selectEndTime:this.endTime,sweep:1};
					var teaServerTime = year+this.monthDay+" "+this.startTime+"~"+year+this.endDate+" "+this.endTime;
					var teaServerStartTime = year+this.monthDay+" "+this.startTime;
					var teaServerEndTime = year+this.endDate+" "+this.endTime;

					param.teaSubscribeTimes=JSON.stringify(teaSubscribeTimes)
					param.serverTime=teaServerTime
					param.teaServerStartTime=teaServerStartTime
					param.teaServerEndTime=teaServerEndTime
				}

				console.log("param.storeId:"+param.teaId)
				console.log("param.userId:"+param.userId)
				console.log("param.useCouponId:"+param.useCouponId)
				console.log("param.useHourCouponId:"+param.useHourCouponId)
				if(this.payType==0||this.payType==1){
					orderPay(param).then(res => {
						var payment = res.data.payment;
						if (res.status == 200) {
							if (payment.payMoney0Success === '1') {
								uni.showToast({
								  title: '支付成功',
								  icon: 'success',
								  duration: 5000,
								})
								var url = "/pages/order/order";
								uni.switchTab({
									url
								})
								//this.$yrouter.push({ path: "/pages/orderList/orderList"});
								//return false;
							}else{
								uni.showToast({
								  title: "支付失败",
								  icon: "none",
								  duration: 2000,
								});
								var url = "/pages/order/order";
								uni.switchTab({
									url
								})
							}
						}else{

							uni.showToast({
							  title: "支付失败",
							  icon: "none",
							  duration: 2000,
							});
							var url = "/pages/order/order";
							uni.switchTab({
								url
							})

						}
					})

				// 微信支付
				}else{

					console.log("微信支付");
					orderPay(param).then(res => {
						var payment = res.data.payment;
						//console.log("res.data.returnCode:"+res.data.returnCode);
						var url = "/pages/order/order";
						if (res.status == 200) {
							if (payment.payMoney0Success === '1') {
								uni.showToast({
								  title: '支付成功',
								  icon: 'success',
								  duration: 5000,
								})
								uni.switchTab({
									url
								})
								//this.$yrouter.push({ path: "/pages/orderList/orderList"});

								return false;
							}else{
								//console.log("timeStamp:"+ payment.timeStamp);
/* 								'timeStamp': res.data.returnData.timeStamp,
								'nonceStr': res.data.returnData.nonceStr,
								'package': res.data.returnData.package,
								'signType': res.data.returnData.signType,
								'paySign': res.data.returnData.paySign, */
/* 								let payment = {
									'timeStamp': res.data.returnData.timeStamp,
									'nonceStr': res.data.returnData.nonceStr,
									'package': res.data.returnData.package,
									'signType': res.data.returnData.signType,
									'paySign': res.data.returnData.paySign
								} */
								console.log("payment:"+JSON.stringify(payment));
								weappPay(payment).finally(() => {
									//resolve()
									uni.switchTab({
										url
									})
									//goOrderDetails(data.result.orderId, type)
								}).then(res => {
									uni.switchTab({
										url
									})
									// #ifdef MP-WEIXIN
									//subscribeMessage()
									// #endif
								})
/* 								weappPay(payment).then(() => {

									uni.switchTab({
										url
									})

								})	 */
							}

						}else{
							uni.showToast({
							  title: "支付失败",
							  icon: "none",
							  duration: 2000,
							});
							uni.switchTab({
								url
							})

						}

						//this.$yrouter.push({ path: "/pages/orderList/orderList"});

					})
				}
			},
			getOrderDetail() { // 获取订单详情
				let that = this
				OrderDetail().then(res => {
					that.orderDetail = res.data.data
					res.data.data.endTimeNum = that.getAfterTime()
					that.endTimeNumBox = setInterval(() => {
						if (that.minutes == 0 && this.seconds == 1) { // 订单支付时间到
							clearInterval(that.endTimeNumBox)
							uni.navigateBack({
								delta: 1
							})
						}
						that.intervalTime(res.data.data.endTimeNum); // 这里计算的是订单剩余时间
					}, 1000)
					// res.data.data.endTimeNum为订单结束时间 时间格式要为 yyyy-mm-dd h:f:s
				})
			},
			intervalTime(autoTime) {
				if (!this.moreTime(autoTime)) {
					if(this.timeOutCount==0){
						uni.showToast({
							title: "当前订单超时支付，已取消",
							icon: "none"
						})
						this.timeOutCount=1;
					}
					return false
				}
				var date1 = (Date.parse(new Date())) / 1000; //计算当前时间戳
				var date2 = (Date.parse(new Date(autoTime))) / 1000; //自动收货的时间戳 （字符串转时间戳）
				var date3 = (date2 - date1) * 1000; //时间差的毫秒数
				//计算出相差天数
				var days = Math.floor(date3 / (24 * 3600 * 1000));
				//计算出小时数
				var leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
				var hours = Math.floor(leave1 / (3600 * 1000));
				//计算相差分钟数
				var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
				var minutes = Math.floor(leave2 / (60 * 1000));
				//计算相差秒数
				var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
				var seconds = Math.round(leave3 / 1000);
				this.minutes = minutes
				this.seconds = seconds
			},
			moreTime(autoTime) {
				var date1 = (Date.parse(new Date())) / 1000; //计算当前时间戳
				var date2 = (Date.parse(new Date(autoTime))) / 1000;; //自动收货的时间戳 （字符串转时间戳）
				//date1 小于date2的话，就返回 `true`，否则返回 `false`
				return date1 < date2
			},
			getAfterTime() {
				var date = new Date(); //1. js获取当前时间
				var min = date.getMinutes(); //2. 获取当前分钟
				date.setMinutes(min + 15); //3. 设置当前时间+10分钟：把当前分钟数+10后的值重新设置为date对象的分钟数
				var y = date.getFullYear();
				var m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
				var d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
				var h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
				var f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
				var s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
				var formatdate = y + '/' + m + '/' + d + " " + h + ":" + f + ":" + s;
				return formatdate
			},
			moneyFilter (value) {
				// 截取当前数据到小数点后两位
				let realVal = parseFloat(value).toFixed(2)
				return realVal
			}
		}
	}
</script>

<style>
	page {
		background: #f7f7f7;
	}
</style>

<style lang="scss" scoped>
	.closeAccount {
		width: 100%;
		height: auto;

		.payTime {
			width: 100%;
			height: auto;
			padding: 50rpx 0 30rpx;

			.payText {
				font-size: 35rpx;
				color: #333;
				font-weight: bold;
				text-align: center;
			}

			.timeBox {
				display: flex;
				align-items: center;
				justify-content: center;
				margin-top: 20rpx;

				.time {
					padding: 8rpx 12rpx;
					border-radius: 10rpx;
					background: #FF7814;
					color: #fff;
					font-size: 32rpx;
				}

				.one {
					margin-right: 15rpx;
				}

				.two {
					margin-left: 15rpx;
				}
			}
		}

		.headerBox {
			width: calc(100% - 40rpx);
			height: auto;
			padding: 20rpx;
			background: #fff;

			.moneyBoxLine {
				font-size: 22rpx;
				color: #a6a6a6;
				text-decoration: line-through;
				margin-left: 15rpx;
			}

			.roomBox {
				display: flex;
				align-items: center;

				image {
					width: 180rpx;
					height: 180rpx;
					border-radius: 10rpx;
				}

				.nameBox {
					flex: 1;
					height: 180rpx;
					margin-left: 20rpx;
					display: flex;
					flex-direction: column;
					justify-content: center;

					.name {
						font-size: 32rpx;
						font-weight: bold;
						color: #333;
					}

					.roomName {
						font-size: 28rpx;
						color: #666;
						margin-top: 15rpx;
					}

					.money {
						margin-top: 15rpx;
						font-size: 30rpx;
						color: #e11112;
						font-weight: bold;

						#e11112 text {
							font-size: 22rpx;
						}
					}
				}
			}

			.roomMsgBox {
				flex: 1;
				height: auto;

				.timeBox,
				.moneyBox {
					margin-top: 30rpx;
					font-size: 28rpx;
					color: #666;
				}

				.timeText {
					color: #666;
					float: right;
				}

				.time {
					float: right;
					margin-left: 15rpx;
					color: #333;
				}
			}
		}

		.ticketBox {
			width: calc(100% - 40rpx);
			height: auto;
			background: #fff;
			padding: 25rpx 20rpx;
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;
			font-size: 28rpx;

			.title {
				color: #717171;
			}

			.content {
				color: #FF7814;
			}
		}

		.paymentFun {
			width: calc(100% - 50rpx);
			height: auto;
			background: #fff;
			margin-top: 20rpx;
			padding: 25rpx;

			.title {
				font-size: 30rpx;
				color: #333;
				font-weight: bold;
			}

			.funBox {
				font-size: 32rpx;
				color: #333;
				font-weight: bold;
				margin-top: 20rpx;
				margin-left: 20rpx;
				display: flex;
				justify-content: space-between;

				.left {
					display: flex;
					align-items: center;

					image {
						margin-right: 20rpx;
						width: 40rpx;
						height: 40rpx;
					}
				}

				text {
					font-size: 24rpx;
					color: #999;
					font-weight: 400;
					margin-left: 20rpx;
				}
			}
		}

		.bottomBox {
			width: calc(100% - 60rpx);
			height: auto;
			padding: 30rpx;
			background: #fff;
			position: fixed;
			bottom: 0rpx;
			left: 0rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.moneyBox>text:nth-child(1) {
				font-size: 24rpx;
				color: #333;
				font-weight: bold;
			}

			.moneyBox>text:nth-child(2) {
				font-size: 28rpx;
				color: #dd1a1a;
				font-weight: bold;
			}

			.moneyBox>text:nth-child(3) {
				font-size: 22rpx;
				color: #a6a6a6;
				text-decoration: line-through;
				margin-left: 15rpx;
			}

			.buttonBox {
				background: #FF7814;
				padding: 15rpx 35rpx;
				color: #fff;
				border-radius: 50rpx;
			}

			.buttonBoxTwo {
				background: #808080;
				padding: 15rpx 35rpx;
				color: #fff;
				border-radius: 50rpx;
			}
		}
	}
</style>
